
    cd "/Users/zhaoyuye/Desktop/Supporting Materials" 
	use data.dta
	
    label variable adopt "Policy adoption"
    label variable centr_doc "Number of relevant documents issued by the central  government(current year)"
    label variable press_mech "Pressure mechanism"
    label variable nat_prop "National proportion"
    label variable emp_level "Resident employment level"
    label variable mod_dev "Local modernization development"
    label variable indstr "Industry structure"
    label variable budinc "Budgeted income"
    label variable pop "Total population"
    label variable turnover "Official turnover(current year)"
    label variable prov_doc "Number of relevant documents issued by the provincial governments(current year)"
    label variable market_lvl "Market level"
    label variable priv_ent "Number of private enterprises"
    label variable leader_char "Leadership characteristics"
    label variable openness "Degree of opening to the outside world"
	
    *** Variable handling ***
	encode city,g(id)
	tsset id year
	bys id (year): gen centr_signal= sum(centr_doc)
	bys id (year): gen prov_signal= sum(prov_doc)
	replace press_mech = ln(press_mech + 1)
	destring pop budinc ,replace force
	gen gov_finan_res =  ln(budinc/pop)
	bys id:ipolate indstr year ,gen(indstr1) epolate
	drop indstr
	rename indstr1 indstr
	tsset id year
	bys id : gen change_yes = turnover + F.turnover
	replace change_yes = turnover if change_yes == .
	replace change_yes = 1 if change_yes > 1
	
	***	Descriptive statistics ***
	ssc install sum2docx,replace
	sum2docx adopt centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes prov_signal using Table1.docx, replace  ///
	stats(N mean(%9.4f) sd(%9.4f) min(%9.4f) median(%9.4f) max(%9.4f)) ///
	title("Table1")
	
    *** Basic line results ***
	tsset id year
	logit adopt L.centr_signal,r
	est sto m1
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes,r
	est sto m2
	logit adopt centr_doc press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if year>=2015&year<=2018,r
	est sto m3
	logit adopt centr_doc press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if year<2015|year>2018,r
	est sto m4	
	esttab m1 m2 m3 m4, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2 m3 m4] using Table2, word replace e(r2_p) dec(4)
	
    *** Margins should be calculated only after running the corresponding regressions ***
	margins,dydx(*)  
    estpost margins, dydx(*)
    esttab using  Marginal.rtf, cell("b(star fmt(4)) t") pr2  replace compress nogap star( * 0.10 ** 0.05 *** 0.01 ) title("Table2")
 
	*** Analysis of impact mechanisms ***
	logit L.prov_signal L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes,r
	est sto m1
	logit adopt L.prov_signal L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes,r	
	est sto m2
	esttab m1 m2, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2] using Table3, word replace e(r2_p) dec(4)  addtext(Control , YES) 
	
    *++++++++++++++++++++++++++++++++*
    *     Heterogeneity analysis     *
    *++++++++++++++++++++++++++++++++*
	***	Marketization index ***
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if market_lvl == 1,r
	est sto m4	
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if market_lvl == 0,r
	est sto m5
	esttab m4 m5, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m4 m5] using Table4（1-2）, word replace e(r2_p) dec(4)  addtext(Control , YES) 
	
	***	Regional location ***
	gen areacode = 1
	replace areacode = 2 if province=="Hebei"
	replace areacode = 2 if province=="Liaoning"
	replace areacode = 2 if province=="Jiangsu"
	replace areacode = 2 if province=="Zhejiang"
	replace areacode = 2 if province=="Fujian"
	replace areacode = 2 if province=="Shangdong"
    replace areacode = 2 if province=="Guangdong"
	replace areacode = 2 if province=="Hainan"
	replace areacode = 3 if province=="Shanxi"
	replace areacode = 3 if province=="Henan"	
	replace areacode = 3 if province=="Hubei"
	replace areacode = 3 if province=="Hunan"
	replace areacode = 3 if province=="Jilin"
	replace areacode = 3 if province=="Heilongjiang"	
	replace areacode = 3 if province=="Anhui"
	replace areacode = 3 if province=="Jiangxi"
	replace areacode = 4 if province=="NingxiaHuiAutonomousRegion"
	replace areacode = 4 if province=="Sichuan"
	replace areacode = 4 if province=="Guizhou"
	replace areacode = 4 if province=="Yunnan"
	replace areacode = 4 if province=="Tibet"
	replace areacode = 4 if province=="Shannxi"
	replace areacode = 4 if province=="Gansu"
	replace areacode = 4 if province=="InnerMongolia"
	replace areacode = 4 if province=="GuangxiZhuangAutonomousRegion"
	
	tsset id year
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if areacode == 2,r
	est sto m1	
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if areacode == 3,r
	est sto m2	
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if areacode == 4,r
	est sto m3	
	esttab m1 m2 m3, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2 m3] using Table4（3-5）, word replace e(r2_p) dec(4)  addtext(Control , YES) 
	
	***	Number of private enterprises ***
	
	tsset id year	
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if priv_ent == 1,r
	est sto m1	
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if priv_ent == 0,r
	est sto m2
	esttab m1 m2, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2] using Table4（6-7）, word replace e(r2_p) dec(4)  addtext(Control , YES)
	
	***	Leadership characteristics ***
	tsset id year
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if leader_char == 1,r
	est sto m1	
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if leader_char == 0,r
	est sto m2
	esttab m1 m2, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2] using Table4（8-9）, word replace e(r2_p) dec(4)  addtext(Control , YES) 
	
	***	City size ***
    replace pop = 0 if pop < 50
    replace pop = 1 if pop >= 50 & pop < 100
    replace pop = 2 if pop >= 100 & pop < 500
    replace pop = 3 if pop >= 500
	
	tsset id year
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if pop == 0,r
	est sto m1	
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if pop == 1,r
	est sto m2	
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if pop == 2,r
	est sto m3	
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if pop == 3,r
	est sto m4	
	esttab m1 m2 m3 m4, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2 m3 m4] using Table4（10-12）, word replace e(r2_p) dec(4)  addtext(Control , YES) 
	
***	Degree of openness to the outside world ***	
	tsset id year	
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if openness == 1,r
	est sto m1	
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes if openness == 0,r
	est sto m2
	esttab m1 m2, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2] using Table4（13-14）, word replace e(r2_p) dec(4)  addtext(Control , YES) 	
	
	***	Central government policy signals and provincial government policy signals ***
	tsset id year
	logit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes,r
	est sto m1
	logit adopt L.prov_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes,r
	est sto m2	
	logit adopt L.prov_signal L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes,r
	est sto m3	
	esttab m1 m2 m3, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2 m3] using Table5, word replace e(r2_p) dec(4)
	
	***	Correlation analysis	***
	corr2docx adopt centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes using TableA1.docx,fmt(%9.4f) replace star

	***	Multicollinearity test	***
    qui reg adopt L.centr_signal L.prov_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes
	estat vif
	
*++++++++++++++++++++++++++++++++*
*       Robustness checks       *
*++++++++++++++++++++++++++++++++*
	
	***	Rare Event Modified Logit Model ***
	ssc install relogit
	gen l_Central = L.centr_signal
	xi:relogit adopt l_Central
	est sto m1
	xi:relogit adopt l_Central press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes
	est sto m2
	esttab m1 m2, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2] using TableA4, word replace e(r2_p) dec(4)  addtext(Control , YES) 
	
	***	Change the Regression Model ***
	probit adopt L.centr_signal,nolog
	est sto m1
	probit adopt L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes
	est sto m2
	esttab m1 m2, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2] using TableA5, word replace e(r2_p) dec(4)  addtext(Control , YES) 
	
	***	Replace Explanatory Variables ***
	logit adopt L.centr_doc,r
	est sto m1
	logit adopt L.centr_doc press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes,r
	est sto m2
	esttab m1 m2, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2] using TableA6, word replace e(r2_p) dec(4)  addtext(Control , YES) 
	
	***	Delete Manually Collated Data ***
	tsset id year
	logit adopt_wm L.centr_signal,r
	est sto m1
	logit adopt_wm L.centr_signal press_mech nat_prop emp_level mod_dev indstr gov_finan_res change_yes,r
	est sto m2
	esttab m1 m2, b(%6.4f) se(%6.4f)  star(* 0.1 ** 0.05 *** 0.01)  scalar(N r2) compress nogaps
    outreg2 [m1 m2] using TableA7, word replace e(r2_p) dec(4)
	
	
	
	
	
	
